﻿using System;
using System.Drawing;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace TCCT_CTC_CSDLDangVienV1
{
    public static partial class UI
    {
        public static class Combo
        {
            #region ApplyDefault

            #region Not Used

            //public static void ApplyDefault(ComboBoxEdit control)
            //{
            //}

            //public static void ApplyDefault(CheckedListBoxControl control)
            //{
            //}

            //public static void ApplyDefault(ImageComboBoxEdit control)
            //{
            //}

            //public static void ApplyDefault(ImageListBoxControl control)
            //{
            //}

            //public static void ApplyDefault(ListBoxControl control)
            //{
            //}

            //public static void ApplyDefault(MRUEdit control)
            //{
            //}

            #endregion Not Used

            #region LookUpEdit

            public static void ApplyDefault(LookUpEdit control)
            {
                control.Properties.NullText = "- Lựa chọn -";
                control.EnterMoveNextControl = true;
                control.BackColor = DEFAULT_BACKCOLOR;
                control.Properties.AppearanceReadOnly.BackColor = READ_ONLY_COLOR;
                control.Properties.ReadOnly = false;
            }

            public static void ApplyDefault(LookUpEdit control, int popupWidth)
            {
                ApplyDefault(control);
                control.Properties.PopupWidth = popupWidth;
            }

            #endregion LookUpEdit

            #region GridLookUpEdit
                
            public static void ApplyDefault(GridLookUpEdit control)
            {
                control.Properties.NullText = "- Lựa chọn -";
                control.EnterMoveNextControl = true;
            }

            #endregion GridLookUpEdit

            #region TreeLookUpEdit

            public static void ApplyDefault(PopupContainerEdit control)
            {
                control.Properties.NullText = "- Lựa chọn -";
                control.EnterMoveNextControl = true;
            }

            #endregion TreeLookUpEdit

            #region RepositoryItemLookUpEdit

            public static void ApplyDefault(DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit control, int popupWidth)
            {
                control.NullText = "- Lựa chọn -";
                control.PopupWidth = popupWidth;
            }

            public static void ApplyDefault(DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit control)
            {
                ApplyDefault(control, control.PopupWidth);
            }
            public static void ApplyDefault(DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit control)
            {
                control.NullText = "- Lựa chọn -";
            }
            
            #endregion RepositoryItemLookUpEdit

            #endregion ApplyDefault
        }
    }
}
